/// @description 执行转换/传送
// You can write your code in this editor
with (oPlayer) 
{
	if(state != PlayerStateDead) state = PlayerStateTransition;
	hSpeed = 0;
	vSpeed = 0;
}
if(leading = OUT)
{
	percent = min(1, percent + TRANSITION_SPEED);	
	if(percent >= 1)//如果屏幕完全模糊
	{
		room_goto(target);
		leading = IN;
	}
}
else
{
	percent = max(0, percent - TRANSITION_SPEED);
	if(percent <= 0)//如果屏幕完全恢复
	{
		with(oPlayer) state = PlayerStateFree;
		instance_destroy();	
	}
}